@extends('home.wechat.layouts.app')
@section('content')
    <div class="page-category" data-log="商品分类">
        @include('home.wechat.layouts._header')
        <div class="page-category-wrap">
            @foreach($categories as $category)
            <div class="list-wrap" id="m0">
                <h3 class="list_title">{{$category->name}}</h3>
                <ol class="list_category">
                    @foreach($category->children as $c)
                    <li onclick="location.href='/wechat/product/index?category_id={{$c->id}}'">
                        <div class="img"><img src="{{$c->thumb}}"></div>
                        <div class="name"><span>{{$c->name}}</span></div>
                    </li>
                  @endforeach
                </ol>
            </div>
            @endforeach
        </div>
        @include('home.wechat.layouts._footer')
    </div>
    @endsection